/**
 * Project Name:trustsql_sdk File Name:TrustSDKException.java Package Name:com.tencent.trustsql.sdk.exception Date:Jul
 * 26, 201711:24:06 AM Copyright (c) 2017, Tencent All Rights Reserved.
 */

package com.mindata.blockchain.common.exception;

import com.alibaba.fastjson.JSON;

/**
 * ClassName:TrustSDKException <br/>
 * Date: Jul 26, 2017 11:24:06 AM <br/>
 * 
 * @author Rony
 * @version
 * @since JDK 1.7
 * @see
 */
public class TrustSDKException extends Exception {

	private static final long serialVersionUID = -4214831807802264420L;

	protected String rtnCd;
	protected String rtnMsg;

	public TrustSDKException(final String rtnCd, final String rtnMsg) {
		super(rtnMsg);
		this.rtnCd = rtnCd;
		this.rtnMsg = rtnMsg;
	}

	public TrustSDKException(final String rtnCd, final String rtnMsg, final Throwable t) {
		super(rtnMsg, t);
		this.rtnCd = rtnCd;
		this.rtnMsg = rtnMsg;
	}

	public String getRtnCd() {
		return rtnCd;
	}

	public void setRtnCd(final String rtnCd) {
		this.rtnCd = rtnCd;
	}

	public String getRtnMsg() {
		return rtnMsg;
	}

	public void setRtnMsg(final String rtnMsg) {
		this.rtnMsg = rtnMsg;
	}

	@Override
	public String toString() {
		return JSON.toJSONString(this);
	}
}
